package com.meilai.project.constant;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * @author 张驰
 * @description 制作单-确认状态
 * @date 2022-08-16 17:35
 */
@Getter
public enum AdMakeConfirmStatusEnum {
    NONE(1, "未确认"),
    PART(2, "部分确认"),
    ALL(3, "已确认");

    @EnumValue
    private final Integer id;
    private final String name;

    AdMakeConfirmStatusEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public static AdMakeConfirmStatusEnum getEnumById(Integer id) {
        for (AdMakeConfirmStatusEnum adMakeConfirmStatusEnum : AdMakeConfirmStatusEnum.values()) {
            if (adMakeConfirmStatusEnum.getId().equals(id)) {
                return adMakeConfirmStatusEnum;
            }
        }
        return null;
    }
}
